package com.yang.action;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.yang.core.BaseAction;
import com.yang.pojo.User;
import com.yang.service.ObjectService;

public class IndexAction extends BaseAction {

	private static final long serialVersionUID = -1265071775034868973L;
	private ObjectService objectService;
	private Log log=LogFactory.getLog(IndexAction.class);
	
	private List<User> list;
	public void setObjectService(ObjectService objectService) {
		this.objectService = objectService;
	}
	@Override
	public String execute() throws Exception {
		log.info(this);
		objectService.save();
		return super.execute();
	}
	public String listAll(){
		list=objectService.findAll();
		return SUCCESS;
	}
	public List<User> getList() {
		return list;
	}
	public void setList(List<User> list) {
		this.list = list;
	}
	
}
